package com.hotelManager.www.po;

import java.math.BigDecimal;

public class User {
    private Integer id;
    private String password;
    private String username;
    private BigDecimal balance;
    private String role;
    private String rechargeStatus; // 充值审核状态：pending-待审核, approved-已通过, rejected-已拒绝
    private BigDecimal rechargeAmount;// 待审核的充值金额
    private String status; // 用户状态：active-正常，banned-封禁



    // 在User类中添加了getter和setter方法
    public User() {} // 必须保留无参构造

    // 添加带参构造
    public User(String username, String password, String role) {
        this.username = username;
        this.password = password;
        this.role = role;
        this.balance = new BigDecimal(0);
        this.rechargeStatus = "pending";
        this.rechargeAmount = new BigDecimal(0);
        this.status = "active"; // 默认状态为正常
    }
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    public String getPassword() {
        return password;}
    public void setUsername(String username) {
        this.username = username;}
    public String getUsername() {
        return username;}
    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }
    public BigDecimal getBalance() {
        return balance;}
    public void setRole(String role) {
        this.role = role;}
    public String getRole() {
        return role;}
    public String getRechargeStatus() {
        return rechargeStatus;
    }

    public void setRechargeStatus(String rechargeStatus) {
        this.rechargeStatus = rechargeStatus;
    }

    public BigDecimal getRechargeAmount() {
        return rechargeAmount;
    }

    public void setRechargeAmount(BigDecimal rechargeAmount) {
        this.rechargeAmount = rechargeAmount;
    }
    
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "users{"+"username="+username+", password="+password+", balance="+balance+", role="+role+", status="+status+"}";
    }
}

